<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--360浏览器优先以webkit内核解析-->
    <title>添加标签</title>
    <link rel="shortcut icon" href="assets/manager/favicon.ico"> 
    <link href="assets/manager/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="assets/manager/css/font-awesome.css?v=4.4.0" rel="stylesheet">
    <link href="assets/manager/css/animate.css" rel="stylesheet">
    <link href="assets/manager/css/style.css?v=4.1.0" rel="stylesheet">
</head>
<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div><h2 class="crumbs">添加标签</h2></div>
        <div class="row">
            <div class="col-sm-6">
                <div class="ibox float-e-margins p10">
                    <div class="form-group">
                        	标签名：
                        <input style="width:250px" id="tag" type="text" name="phone" placeholder="标签名">
                    </div>
                    <button class="btn btn-primary" id="add" type="submit">添加</button>
                    <button class="btn btn-white" id="close" type="submit">取消</button>
                </div>
            </div>
        </div>
    </div>
    <!-- 全局js -->
    <script src="assets/manager/js/jquery.min.js?v=2.1.4"></script>
    <script src="assets/manager/js/bootstrap.min.js?v=3.3.6"></script>
    <script src="assets/manager/js/plugins/layer/layer.min.js"></script>
    <!-- Flot -->
    <script src="assets/manager/js/plugins/flot/jquery.flot.js"></script>
    <script src="assets/manager/js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="assets/manager/js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="assets/manager/js/plugins/flot/jquery.flot.pie.js"></script>
    <!-- 自定义js -->
    <script src="assets/manager/js/content.js"></script>
    <!--flotdemo-->
	<script type="text/javascript">
		//添加tag
		$("#add").click(function(){
			var $name = $("#tag").val();
			$.post("addTag",{name:$name},function(data){
				if(data == 1){
					alert("添加成功！");
					window.location.href="mgtags";
				}
			})
		});
		$("#close").click(function(){
			window.location.href="mgtags";
		});
		//添加tag
	</script>
</body>
</html>